package com.red.book.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.view.View;

import com.neo.duan.mvp.present.BasePresenter;
import com.neo.duan.ui.activity.BaseAppActivity;
import com.neo.duan.utils.StatusBarUtil;
import com.red.book.R;

import butterknife.ButterKnife;


/**
 * @author neo.duan
 * @date 2018/1/15 14:32
 * @desc 请描述该文件
 */
public abstract class BaseActivity<P extends BasePresenter>  extends BaseAppActivity<P> {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        StatusBarUtil.setColor(this, ContextCompat.getColor(getApplicationContext(), R.color.red), 0);
        super.onCreate(savedInstanceState);
    }

    @Override
    public void setContentView(View contentView) {
        super.setContentView(contentView);
        ButterKnife.bind(this, contentView);

        enableBottomLine(false);
        setTopBarBackgroundColor(R.color.red);
        setBackgroundColor(R.color.background);
        setTopBarTitleColor(android.R.color.white);
    }
}
